<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>函数式组件</title>
</head>

<body>
    <div id="test"></div>

    <script type="text/javascript" src="../js/react.development.js"></script>
    <script type="text/javascript" src="../js/react-dom.development.js"></script>
    <script type="text/javascript" src="../js/babel.min.js"></script>

    <script type="text/babel">
        //创建函数式组件
        function FunctionComponent() {

            console.log(this);
            return <h2>我是函数式组件【简单组件】</h2>
        }

        ReactDOM.render(<FunctionComponent/>, document.getElementById('test'))

    </script>
</body>
</body>

</html>